statefiles: write straight to file in statefiles_write_state4()
authorDavid Härdeman <[email protected]>
Sat, 8 Nov 2025 16:48:00 +0000 (17:48 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Tue, 11 Nov 2025 07:31:02 +0000 (08:31 +0100)
commit940ecbb3916162cf734ffe95e87363199a0c119b
treed984f4b444e489561e35252e17d6cba2242bb509
parentebe0b83db6a98792229f25b020ea146efe874702
statefiles: write straight to file in statefiles_write_state4()

Instead of writing to a buffer, then to a file, just write straight to
file. This also makes the order of the steps in the function more
logical (i.e. matches the order in which things are actually written to
file).

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/302
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/statefiles.c